package ${commonPackageName}.entity.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 
 * @author lizihao
 *
 * @param <T>
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel("分页请求体")
public class PageReq<T>  {

    @ApiModelProperty("分页信息")
    private PageInfo pageInfo;


    @JsonIgnore
    public Page<T> getPage() {
        return new Page<>(pageInfo.getPageNum(), pageInfo.getPageSize());
    }
}
